
const customElements = ['bpmn:Task']
/**
 * 设置连接箭头颜色
 * @param shape
 * @param color
 */
const setConnectArrows = (shape,color) => {
    let str = shape.style.markerEnd;
    let startIndex =str.indexOf('#');
    let endIndex = str.lastIndexOf('"');
    let id = str.substring(startIndex+1,endIndex)
    let dom =  document.getElementById(id) as HTMLElement
    let sonDom = dom.firstChild as HTMLElement
    dom.style.setProperty('fill', color)
    dom.style.setProperty('stroke', color)
    sonDom.style.setProperty('fill', color)
    sonDom.style.setProperty('stroke', color)
}


export { customElements,setConnectArrows }

